package ObserverMode

class SinaConditions extends Observer {
  private var tmeperature: Float = _
  private var pressure: Float = _
  private var humidity: Float = _

  override def update(mTemperature: Float, mPressure: Float, MHumidity: Float): Unit = {
    this.tmeperature = mTemperature
    this.pressure = mPressure
    this.humidity = MHumidity
    display()
  }

  def display(): Unit = {
    println("today temperature:" + tmeperature)
    println("today Pressure:" + pressure)
    println("today Humidity:" + humidity)
  }

}
